<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%@ page isELIgnored="false" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<div id="pop_up_content">
	<div class="pop_up_title images_13">
		<s:if test="null==form.id || ''.equal(form.id)">
			新建竞标公司
		</s:if>
		<s:else>
			编辑竞标公司
		</s:else>
	</div>
	<div class="pop_up_body">
		<form id="tenderCompanyEdit" action="<%=basePath%>tenderCompany/tenderCompanyAction!editTenderCompany.action" >
			<input type="hidden" value="<s:property value='form.id'/>" name="form.id"/>
			<table border="0" cellpadding="0" cellspacing="0" width="450px">
				<tr style="height:22px;">
					<td class="form_input_value" >
						<span class="red">*</span>公司名称
					</td>
					<td colspan="3">
					   <input style="width:260" id="form.companyName" name="form.companyName" type="text" value="${form.companyName}" class="required validate_forbiddenChar max_length:40" />
					</td>
				</tr>
				<tr style="height:22px;">
					<td class="form_input_value">
							<span class="red">*</span>公司地址
					</td>
					<td  colspan="3">
						<input style="width:260" id="form.address" name="form.address" type="text" value="${form.address}" class="required validate_forbiddenChar max_length:40" />
					</td>
				</tr>
				<tr style="height:22px;">
					<td class="form_input_value">
							<span class="red">*</span>投标金额
					</td>
					<td  colspan="3">
						<input style="width:260" id="form.tenderMoney" name="form.tenderMoney" type="text" value="${form.tenderMoney}" class="required validate_folat max_length:40" />
					</td>
				</tr>
				<s:if test="form.bidBookId!=null&&form.bidBookId!=''&&(form.id==null||form.id=='')">
					<input type="hidden" style="width:260" id="form.bidBookId" name="form.bidBookId"  value="${form.bidBookId}"   />
				</s:if>
				<s:else>
					<tr style="height:22px;">
						<td class="form_input_value" >
								<span class="red">*</span>标书
						</td>
						<td colspan="3">
						   <select id="prodPriceData_subjectIdNew" name="form.bidBookId"  style="width: 260px">
								<s:iterator id="bidBooList" value="bidBookWrapperList" status="status">
									<option value="${id}" <s:if test="id==form.bidBookId">selected="selected"</s:if>><s:property value="projectName"/></option>
								</s:iterator>
							</select>
						</td>
					</tr>
				</s:else>
				<%--
				<tr style="height:22px;">
					<td class="form_input_value" >
						<span class="red">*</span>公司优势
					</td>
					<td colspan="3">
					   <input style="width:260" id="form.edge" name="form.edge" type="text" value="${form.edge}" class="required validate_forbiddenChar max_length:40">
					</td>
				</tr>
				
				<tr style="height:22px;">
					<td class="form_input_value">
							<span class="red">*</span>公司劣势
					</td>
					<td  colspan="3">
						<input style="width:260" id="form.inferior" name="form.inferior" type="text" value="${form.inferior}" class="required validate_forbiddenChar max_length:40">
					</td>
				</tr>
				<tr style="height:22px;">
					<td class="form_input_value">
							<span class="red">*</span>业务员
					</td>
					<td  colspan="3">
						<input style="width:260" id="form.salesMan" name="form.salesMan" type="text" value="${form.salesMan}" class="required validate_forbiddenChar max_length:40">
					</td>
				</tr>
				<tr style="height:22px;">
					<td class="form_input_value" >
						<span class="red">*</span>业务员手机
					</td>
					<td colspan="3">
					   <input style="width:260" id="form.salesPhone" name="form.salesPhone" type="text" value="${form.salesPhone}" class="required validate_forbiddenChar max_length:40">
					</td>
				</tr>
				 --%>
				<tr style="height:22px;">
					<td class="form_input_value">
							<span class="red"></span>备注
					</td>
					<td  colspan="3">
						<input style="width:260" id="form.mark" name="form.mark" type="text" value="${form.mark}" >
					</td>
				</tr>
				<tr style="height:22px;">
					<td></td>
					<td colspan="3">
						<input id="tenderCompanyEditSubmit" type="button" value="确定" class="btn" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'">
						<input type="button" value="取消" class="btn" onclick="hideDialog()" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'">
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>
<script>
	
	/* 表单提交 */
	i.formSubmit("tenderCompanyEditSubmit",	//绑定的按钮id
					  "tenderCompanyEdit" ,   //提交的表单id
					  function(result){
						  	var jsonMsgObj=new JsonMsgObj(result);
							var  msg=jsonMsgObj.getMessage();
						    var codeId=jsonMsgObj.getCodeid();
							var isOk=jsonMsgObj.getIsok();
							if( isOk ){
							    aerouiAlert(msg);
								hideDialog();// 隐藏窗口
								window.location.reload();
							}else{		// 如果编辑失败了
							  JsManageInfoHandleException( result , function(msg , codeId , isOk){
							  		hideDialog();// 隐藏窗口
							   });
						   }
						});
</script>